#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace PhotoGallery.Core.Business
{
    [Serializable]
    public class Leader : Business.BusinessBase<Leader, int>
    {
        #region Fields and Properties

        private String description = String.Empty;
        /// <summary>
        /// 
        /// </summary>
        public String Description
        {
            get { return description; }
            set
            {
                if (value != description)
                {
                    MarkChanged("Description");
                    description = value;
                }
            }
        }

        private String name = String.Empty;
        /// <summary>
        /// 
        /// </summary>
        public String Name
        {
            get { return name; }
            set
            {
                if (value != name)
                {
                    MarkChanged("Name");
                    name = value;
                }
            }
        }

        #endregion Fields and Properties

        #region Constructors

        public Leader()
        {
        }

        #endregion Constructors

        #region Base overrides

        protected override void ValidationRules()
        {
        }

        protected override Leader DataSelect(int id)
        {
            return Services.DALService.LeaderService.Select(id);
        }

        protected override void DataUpdate()
        {
            Services.DALService.LeaderService.Update(this);
        }

        protected override void DataInsert()
        {
            Services.DALService.LeaderService.Insert(this);
        }

        protected override void DataDelete()
        {
            Services.DALService.LeaderService.Delete(this);
        }

        #endregion Base overrides



        public static ICollection<Leader> Search(string s)
        {
            return Services.DALService.LeaderService.Search(s);
        }


        public static ICollection<Leader> GetAllLeader()
        {
            return Services.DALService.LeaderService.GetAllLeader();
        }

        public static IList<PhotoGallery.Core.Business.Leader> GetAll()
        {
            return Services.DALService.LeaderService.GetAll();
        }

    }
}
